﻿Public Class clsPgdMes
    Public Function getList(sys_id As String) As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT a.*,b.material_code FROM sf.b_pgd_mes a "
        szSql &= "left join sf.b_pgd_mes_details b on a.sys_id=b.b_pgd_mes_sys_id "
        szSql &= "where 1 = 1 and a.sys_id = ? and b.procedure_name='预组装'"
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, sys_id)
        Return dt
    End Function

    Public Function getListBySysId(sys_id As String) As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT sys_id,oper_date,mes_project_name,support_model,oper_count,note,workshop_id,validity,"
        szSql &= "status,origin,operator,update_time,finish_count,mes_project_code,change_shifts_content,lhj,pgd_code,start_time,end_time,jp_type,jp_spec,"
        szSql &= "lhj_type,type_value as material_code,oper_count_all,pgd_type"
        szSql &= " FROM sf.b_pgd_mes where 1 = 1 and sys_id = ? "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, sys_id)
        Return dt
    End Function

End Class
